/**
 * 
 */
package com.planner.core.service.rest;

import com.google.appengine.repackaged.com.google.common.base.Predicate;
import com.india.metro.delhi.DelhiMetroNode;

/**
 * @author Sangharsh
 *
 */
public class NodeNamePredicate implements Predicate<DelhiMetroNode> {

	private String prefix;
	public NodeNamePredicate(String prefix){
		this.prefix = prefix.trim();
	}
	public boolean apply(DelhiMetroNode node) {
		return node.getName().toUpperCase().startsWith(prefix.toUpperCase());
	}

}
